 <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="{:U('Index/index')}">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">员工管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                
                    <table class="search-tab">
                        <tr>
                           
						 <td>&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-primary btn2" href="{:U('Yuangong/add')}">添加员工</a></td>

                        </tr>
                    </table>
                
            </div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
              
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                           
                            <th>用户名</th>
							<th>营业金额</th>
                            <th>操作</th>
                        </tr>
						
						<foreach name="re" item="v">
						
                        <tr>
                           
                            <td>{$v.username}</td>
                            
                            <td>{$v.money}元 | <a href="{:U('Yuangong/xiangxi',array('id'=>$v['id']))}">查看详细</a></td>
							<td>
							
							   <a style="cursor:pointer;" onclick="del({$v.id})">删除</a>
							</td>
                        </tr>
                        </foreach>
                    </table>
                    <div class="list-page"> {$page}</div>
                </div>
            </form>
        </div>
    </div>

   <script>
     
	 function del(i){
	 
	 //alert(i);
	   
	   if(confirm('您确定删除吗')){
	   
	     $.post("{:U('Yuangong/del')}",{"id":i},function(re){
		   
		  
		   if(re==1){
		   
		   
		     alert('删除成功');location.reload();
		   
		   }else{
		   
		     alert('删除失败');
		   
		   }
		 
		 
		 })
	   
	   
	   
	   }
	 
	 
	 
	 }
   
   
   </script>


